#include<iostream>
#include<math.h>
using namespace std;
class Point
{
    public:
        Point();
        void set_point1();
        void set_point2();
        void caculation();
    private:
        int point1_x;
        int point1_y;
        int point2_x;
        int point2_y;
        double distance;
};
int main()
{
    Point p1;
    p1.set_point1();
    p1.set_point2();
    p1.caculation();
    system("pause");
}
Point::Point()
{
   point1_x=0;
   point1_y=0;
   point2_x=0;
   point2_y=0; 
}
void Point::set_point1()
{
    cout<<"Please first point x and y: ";
    cin>>point1_x;
    cin>>point1_y;
}
void Point::set_point2()
{
    cout<<"Please second point x and y: ";
    cin>>point2_x;
    cin>>point2_y;
}
void Point::caculation()
{
    int x = pow(point1_x-point2_x,2);
    int y = pow(point1_y-point2_y,2);
    distance = pow(x+y,0.5);
    cout<<"The distance of two point = "<<distance<<endl;
}
